package lnu.project.cart.entity;

import java.util.ArrayList;
import java.util.List;

public class Basket {	
	/* Get; */
	private long id;
	public static String ID = "ID";
	
	/* Get; Set; */
	private String name;
	public static String NAME = "NAME";
	
	/* Get; */
	private List<Product> products = new ArrayList<Product>();
	
	public Basket(String name){
		//add auto-increasing ID
		this.name = name;
	}
	
	public Basket(long id, String name){
		this.id = id;
		this.name = name;
	}
	
	public long getId() {
		return this.id;
	}

	public String getName() {
		return this.name;
	}

	public List<Product> getProducts() {
		if(this.products == null)
			this.products = new ArrayList<Product>();
		return this.products;
	}
	
	public void setName(String name){
		this.name = name;
		
	}
}
